<?php defined('LFNC_VERSION') or die('forbidden');


/**
* MLT Web Engine
* http://www.molotsoft.ru
*
* @package MLT_WE
* @subpackage Lucky_Funcs
* @author Ivan Chistyakov <ivan@molotsoft.ru>
* @version $Id: math.lfnc.php 142 2009-03-07 10:20:49Z molotsoft@gmail.com $
* @link $HeadURL: http://lucky-funcs.googlecode.com/svn/trunk/funcs/math.lfnc.php $
*/


//function in_range($min, $value, $max) {
//return max($min, min($value, $max)) === $value; // ($min <= $value) && ($value <= $max);
//}

function in_range_start_end($min, $start_value, $end_value, $max) {
	return in_range($min, $start_value, $end_value) && in_range($start_value, $end_value, $max);
}

function sign($number) {
	return empty($number) ? 0 : intval($number / abs($number));
}

function even($number) {
	return ($number % 2) === 0;
}

function odd($number) {
	return ($number % 2) !== 0; // !even($number)
}


?>